/*     */ package hmc;
/*     */ 
/*     */ import java.awt.Container;
/*     */ import java.awt.event.ActionEvent;
/*     */ import java.awt.event.ActionListener;
/*     */ import javax.swing.GroupLayout;
/*     */ import javax.swing.GroupLayout.Alignment;
/*     */ import javax.swing.GroupLayout.ParallelGroup;
/*     */ import javax.swing.GroupLayout.SequentialGroup;
/*     */ import javax.swing.JButton;
/*     */ import javax.swing.JInternalFrame;
/*     */ import javax.swing.JLabel;
/*     */ import javax.swing.JPanel;
/*     */ import javax.swing.JPasswordField;
/*     */ import javax.swing.JRootPane;
/*     */ import javax.swing.JTextField;
/*     */ import javax.swing.LayoutStyle.ComponentPlacement;
/*     */ import javax.swing.SwingUtilities;
/*     */ import javax.swing.event.InternalFrameEvent;
/*     */ import javax.swing.event.InternalFrameListener;
/*     */ 
/*     */ class SSHLogin extends JInternalFrame
/*     */   implements ActionListener, InternalFrameListener
/*     */ {
/*     */   private SSHCommunicator SSHC;
/*     */   private JButton ConfirmButton;
/*     */   private JLabel PasswordLabel;
/*     */   private JPasswordField PasswordTextField;
/*     */   private JLabel UserNameLabel;
/*     */   private JTextField UserNameTextField;
/*     */   private JLabel ShellTypeLabel;
/*     */   private JTextField ShellTypeTextField;
/*     */   private JPanel jPanel1;
/*     */ 
/*     */   public SSHLogin(SSHCommunicator SSHC)
/*     */   {
/* 415 */     super("Login Information", false, true, false, true);
/*     */ 
/* 420 */     this.SSHC = SSHC;
/* 421 */     initComponents();
/* 422 */     SwingUtilities.invokeLater(new Runnable() {
/*     */       public void run() {
/* 424 */         SSHLogin.this.UserNameTextField.requestFocus();
/*     */       } } );
/*     */   }
/*     */ 
/*     */   public void initComponents() {
/* 430 */     this.jPanel1 = new JPanel();
/* 431 */     this.UserNameLabel = new JLabel();
/* 432 */     this.PasswordLabel = new JLabel();
/* 433 */     this.ShellTypeLabel = new JLabel();
/* 434 */     this.ShellTypeTextField = new JTextField();
/* 435 */     this.UserNameTextField = new JTextField();
/* 436 */     this.PasswordTextField = new JPasswordField();
/* 437 */     this.ConfirmButton = new JButton();
/*     */ 
/* 439 */     setDefaultCloseOperation(2);
/*     */ 
/* 441 */     this.UserNameLabel.setText("Enter Username:");
/*     */ 
/* 444 */     this.PasswordLabel.setText("Enter Password:");
/*     */ 
/* 446 */     this.ShellTypeLabel.setText("Enter Shell Type:");
/* 447 */     this.ShellTypeTextField.setText("dumb");
/*     */ 
/* 449 */     this.ConfirmButton.setText("Confirm");
/*     */ 
/* 451 */     this.ConfirmButton.setActionCommand("0");
/* 452 */     this.ConfirmButton.addActionListener(this);
/*     */ 
/* 454 */     this.PasswordTextField.setEchoChar('*');
/*     */ 
/* 456 */     getRootPane().setDefaultButton(this.ConfirmButton);
/*     */ 
/* 460 */     GroupLayout jPanel1Layout = new GroupLayout(this.jPanel1);
/* 461 */     this.jPanel1.setLayout(jPanel1Layout);
/* 462 */     jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(this.UserNameLabel).addComponent(this.PasswordLabel).addComponent(this.ShellTypeLabel)).addGap(37, 37, 37).addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(this.PasswordTextField, GroupLayout.Alignment.LEADING, -2, 150, -2).addComponent(this.UserNameTextField, GroupLayout.Alignment.LEADING, -2, 150, -2).addComponent(this.ShellTypeTextField, GroupLayout.Alignment.LEADING, -2, 150, -2))).addGroup(jPanel1Layout.createSequentialGroup().addGap(50, 50, 50).addComponent(this.ConfirmButton, -2, 170, -2))).addContainerGap(-1, 32767)));
/*     */ 
/* 482 */     jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.UserNameLabel).addComponent(this.UserNameTextField, -2, -1, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.PasswordLabel).addComponent(this.PasswordTextField, -2, -1, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.ShellTypeLabel).addComponent(this.ShellTypeTextField, -2, -1, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(this.ConfirmButton).addContainerGap(-1, 32767)));
/*     */ 
/* 502 */     GroupLayout layout = new GroupLayout(getContentPane());
/* 503 */     getContentPane().setLayout(layout);
/* 504 */     layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(this.jPanel1, -2, -1, -2));
/*     */ 
/* 508 */     layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(this.jPanel1, -2, -1, -2));
/*     */ 
/* 513 */     pack();
/*     */   }
/*     */ 
/*     */   public void actionPerformed(ActionEvent e)
/*     */   {
/* 527 */     switch (Integer.parseInt(e.getActionCommand())) {
/*     */     case 0:
/* 529 */       this.SSHC.login(this.UserNameTextField.getText(), new String(this.PasswordTextField.getPassword()), this.ShellTypeTextField.getText());
/* 530 */       dispose();
/* 531 */       return;
/*     */     }
/*     */   }
/*     */ 
/*     */   public void internalFrameClosing(InternalFrameEvent e)
/*     */   {
/* 543 */     this.SSHC.comm.dispose();
/*     */   }
/*     */ 
/*     */   public void internalFrameClosed(InternalFrameEvent e)
/*     */   {
/*     */   }
/*     */ 
/*     */   public void internalFrameOpened(InternalFrameEvent e)
/*     */   {
/*     */   }
/*     */ 
/*     */   public void internalFrameIconified(InternalFrameEvent e)
/*     */   {
/*     */   }
/*     */ 
/*     */   public void internalFrameDeiconified(InternalFrameEvent e)
/*     */   {
/*     */   }
/*     */ 
/*     */   public void internalFrameActivated(InternalFrameEvent e)
/*     */   {
/*     */   }
/*     */ 
/*     */   public void internalFrameDeactivated(InternalFrameEvent e)
/*     */   {
/*     */   }
/*     */ }

/* Location:           F:\6-30-2012\Hazell\
 * Qualified Name:     hmc.SSHLogin
 * JD-Core Version:    0.6.0
 */